/**
 * @see [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/api/bluetooth.html#wxgetbledeviceservicesobject)
 * @param deviceId [string] 蓝牙设备 id
 */

export default function close_ble_connection(deviceId: string) {
	return new Promise<{
		services: Array<{
			uuid: string;
			isPrimary: boolean;
		}>;
	}>((resolve, reject) => {
		wx.getBLEDeviceServices({
			deviceId,
			success(res) {
				resolve(res);
			},
			fail() {
				reject(false);
			}
		});
	});
}
